<template>
	<view class='foo'>
        <view class='foo_left' @click='changeAllstate'>     <radio :checked='isFullcheck' color='#c00000' ></radio><text>全选1</text>
        </view>
	 
      <view class='foo_center'> 合计:<text class='fff'>￥{{checkedGoodsAmount}}</text> </view>
      <view class='foo_right'>
        <text>结算({{chechedCount}})</text>
        </view>
	</view>
</template>

<script>
  import  {mapGetters,mapMutations} from 'vuex'
	export default {
		data() {
			return {
				
			};
		},
    computed:{
      ...mapGetters('m_cart',['chechedCount','total','checkedGoodsAmount']),
      isFullcheck(){
        return this.chechedCount == this.total
      }
    },
    methods:{
      ...mapMutations('m_cart',['updataAll']),
      changeAllstate(){
        this.updataAll(!this.isFullcheck)
      }
    }
	}
</script>

<style lang="less">
 .foo{
   height:50px;
   display:flex;
   background:#fff;
   justify-content:space-between;
  align-items:center;
  padding:0 0 0 10px;
  .foo_left{}
   .foo_center{
     .fff{
       color:red;
       }
   }
   .foo_right{
     width:100px;
     height:100%;
     background: red;
     display:flex;
     justify-content:center;
     align-items:center;
       text{
         color:#fff;
         }
   }
 }
</style>
